Introduction

Texas is no stranger to drought: the state has faced several droughts in recent decades, including the most recent and most severe drought that began in 2011. Texas has faced increasing demand for water to meet the needs of its rapidly growing population. Moreover, climate change has led to Texas experiencing an increase in drought events since 2011, which has intensified the for an impactful solution for state’s water situation.

Texas is an enormous body of land, and it is difficult to conceptualize the degree of drought without a visual representation. In particular, spatial and temporal visualization can improve our knowledge on the intensity of the drought’s implication on the area throughout Texas. For visualization, the manner of the exploratory focus should be clearly investigated, where factors causing drought range from “Temperature” to “Precipitation” will be analyzed.

Analysis on the relationships between factors of drought, and the spread of the drought area, will be investigated.

Required packages and data

# packages installment
library(rmarkdown)
library(gridExtra)
library(ggplot2)
library(rgdal)
## Loading required package: sp
## rgdal: version: 1.2-10, (SVN revision 673)
##  Geospatial Data Abstraction Library extensions to R successfully loaded
##  Loaded GDAL runtime: GDAL 2.1.3, released 2017/20/01
##  Path to GDAL shared files: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal/gdal
##  Loaded PROJ.4 runtime: Rel. 4.9.3, 15 August 2016, [PJ_VERSION: 493]
##  Path to PROJ.4 shared files: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgdal/proj
##  Linking to sp version: 1.2-5
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following object is masked from 'package:gridExtra':
## 
##     combine
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(DT)
library(leaflet)
knitr::opts_chunk$set(cache=TRUE)
# data1 us monitor data loading
tx_1y <- read.csv('data/tx_1y.csv')
tx_1y_1 <- read.csv('data/tx_1y.csv')
tx_1031 <- read.csv('data/tx_1031.csv')
tx <- as.data.frame(tx_1031)
# data2 temp$precip data loading
min_mean <- read.csv('data/minmean.csv')
max_mean <- read.csv('data/maxmean.csv')
precip <- read.csv('data/precip.csv')
drought <- read.csv('data/drought.csv')
# load texas shp file
shp <- readOGR(dsn=path.expand("data/bnd_tx/txdot-counties/txdot-2015-county-generalized_tx.shp"))
shp@data = data.frame(shp@data, tx[match(shp@data[["FIPS"]], tx$FIPS),])
knitr::opts_chunk$set(cache=TRUE)

Visualization of drought distribution

Drought Percent area in Texas

# visualization the drought percent area in 1 year
# convert table and date formet 
as.data.frame(tx_1y)
tx_1y$ReleaseDate<-as.Date(as.character(tx_1y$ReleaseDate),format="%Y%m%d");
## Warning in strptime(x, format, tz = "GMT"): unknown timezone 'zone/tz/
## 2017c.1.0/zoneinfo/America/New_York'
# datatable visualization
datatable(tx_1y_1,style = 'default',options = list(pageLength = 10),)
# chart of one-year drought percent area
ggplot(tx_1y, aes(ReleaseDate, tx_1y$D0))+geom_area()+ geom_area(aes(x = ReleaseDate,y=tx_1y$D1), fill='yellow') +geom_area(aes(x = ReleaseDate,y=tx_1y$D2),fill='orange')+geom_area(aes(x = ReleaseDate,y=tx_1y$D3),fill='red') + xlab("Date")+ylab("Percent Area") 

shp_loglat <- spTransform(shp,CRS("+proj=longlat +datum=WGS84"))
D0 <- shp[shp@data$D0!=0,]
D0_loglat <- spTransform(D0, CRS("+proj=longlat +datum=WGS84"))
D1 <- shp[shp@data$D1!=0,]
D1_loglat <- spTransform(D1, CRS("+proj=longlat +datum=WGS84"))
D2 <- shp[shp@data$D2!=0,]
D2_loglat <- spTransform(D2, CRS("+proj=longlat +datum=WGS84"))

leaflet(shp@bbox) %>%
  addTiles()%>%
    addPolygons(data=shp_loglat,weight = 1,color = "grey",fillColor = "grey",stroke = T,fillOpacity = 0.1)%>%
  addPolygons(data=D0_loglat,weight = 2,color = "yellow",fillColor = "yellow",stroke = F,fillOpacity = 0.4)%>%
  addPolygons(data=D1_loglat,weight = 3,color = "orange",fillColor = "orange",stroke = F,fillOpacity = 0.8)%>%
  addPolygons(data=D2_loglat,weight = 4,color = "red",fillColor = "red",stroke = F,fillOpacity = 1)
# visualization the drought area in D1 degree_ moderate drought
shp2 <- fortify(shp)
## Regions defined for each Polygons
shp$id <- row.names(shp)
shp2 <- left_join(shp2,shp@data,by="id")
ggplot <- ggplot(data = shp2,aes(x=long,y=lat,group=group,fill=D1))+geom_polygon() + coord_map() + scale_fill_gradient(low = 'white',high = 'red')
ggplot

# visualization the drought area in D2 degree_ severe drought
shp2 <- fortify(shp)
## Regions defined for each Polygons
shp$id <- row.names(shp)
shp2 <- left_join(shp2,shp@data,by="id")
ggplot <- ggplot(data = shp2,aes(x=long,y=lat,group=group,fill=D2))+geom_polygon() + coord_map() + scale_fill_gradient(low = 'white',high = 'red')
ggplot

# visualization the drought area in D3 Extreme_ severe drought
shp2 <- fortify(shp)
## Regions defined for each Polygons
shp$id <- row.names(shp)
shp2 <- left_join(shp2,shp@data,by="id")
ggplot <- ggplot(data = shp2,aes(x=long,y=lat,group=group,fill=D3))+geom_polygon() + coord_map() + scale_fill_gradient(low = 'white',high = 'red')
ggplot

Analysis of causes

Visualization of relation between precipitation and temperature

Relationship analysis

Results and Conclusions

References